<!DOCTYPE html>
<html>
<body>
<div id="diet-detail-context" class="col-md-12">
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">每日饮食</h3>
        </div>
        <div class="box-body">

            <div class="row">
                <div class="col-lg-6 form-group">
                    <label>日期</label>
                    <div class="input-group date">
                        <div class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </div>
                    <#--<input type="text" class="form-control pull-right" id="health_diet_date">-->
                    <#--<div class="input-group-addon">-->
                    <#--<i class="fa fa-calendar"></i>-->
                    <#--</div>-->
                        <input type="text" class="form-control pull-right"
                        value="${diet.dietTime?date}"
                               id="health_diet_date" placeholder="点击输入 ..." disabled>
                    </div>
                </div>
                <div class="col-lg-6 form-group">
                <label>类型</label>
                <select id="health_diet_type" class="form-control select2" style="width: 100%;" disabled>
                    <option value="早餐" <#if diet.dietType='水'> selected="selected"</#if>>早餐</option>
                    <option value="午餐" <#if diet.dietType='米饭'> selected="selected"</#if>>午餐</option>
                    <option value="晚餐" <#if diet.dietType='米饭'> selected="selected"</#if>>晚餐</option>
                    <option value="水" <#if diet.dietType='米饭'> selected="selected"</#if>>水</option>
                    <option value="甜点" <#if diet.dietType='米饭'> selected="selected"</#if>>甜点</option>
                </select>
            </div>
            </div>
            <div class="row">
                <div class="col-lg-6 form-group">
                    <label>摄入量</label>
                    <input id="health_diet_cnt" type="text" class="form-control"
                    value="${diet.dietCount}"
                           placeholder="点击输入 ..." disabled>
                </div>
                <div class="col-lg-6 form-group">
                <label>摄入单位</label>
                <select id="health_diet_unit" class="form-control select2" style="width: 100%;" disabled>
                    <option value="克" <#if diet.dietUnit='克'> selected="selected"</#if>>克</option>
                    <option value="升" <#if diet.dietUnit='升'> selected="selected"</#if>>升</option>
                </select>
            </div>
            </div>

            <div id="diet_detail_list">
                <#list dietDetails as food>
                    <div class="row" >
                        <div hidden="hidden">
                            <input type="number" name="connId" value="${food.id}">
                        </div>
                        <div class="col-lg-6 form-group">
                            <label>食物种类</label>
                            <input type="text" name="foodType" class="form-control" value="${food.foodType}"
                                   placeholder="点击输入..." disabled>

                        </div>
                        <div class="col-lg-3 form-group">
                            <label class="col-lg-12">摄入量</label>
                            <input type="text" name="foodCount" class="form-control" value="${food.foodCount}"
                                   placeholder="点击输入..." disabled>
                        </div>
                        <div class="col-lg-3 form-group">
                            <label class="col-lg-12">摄入单位</label>
                            <select name="foodUnit" class="form-control select2" style="width: 100%;" disabled>
                                <option value="克" <#if food.foodUnit='克'> selected="selected"</#if>>克</option>
                                <option value="升" <#if food.foodUnit='升'> selected="selected"</#if>>升</option>
                            </select>
                        </div>
                    </div>
                </#list>
            </div>


            <div class="box-body">
                <div class=" col-lg-12">
                    <label class="col-lg-12"></label>
                    <button id="addFood" class="btn btn-info pull-left"
                            onclick="addFood()">编辑
                    </button>
                    <button id="addHealthDiet" type="submit" class="btn btn-info pull-right"
                            onclick="addHealthDiet()">更新
                    </button>
                </div>
            </div>


        </div>
    </div>
</div>
</body>
</html>